Part Number Hot Search : 
1044470 SAC50 1N5069 IRG4BC A114Y MCP130T MSK4362 P2005
Product Description
Full Text Search
 

To Download JA1 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? rej05b0816-0110 rev.1.10 2007.11 page 1 of 17 application notes m16c/26a group sample program (message) 1. summary this sample program receives the text data (message) input from the keyboard of a pc and shows the message on liquid crystal di splay while at the same time writing it into the internal flash memory by using the re nesas starter kit for m16c/26a (r0k33026as000be ). 2. introduction the example described in this document appl ies to the microcomputers listed below: microcomputers: m16c26a this sample program runs on the renesas starter kit for m16c/26a (r0k33026as000be). prepare an extension board available for the renesas starter kit or create a circuit similar to the one shown in the example ci rcuit on page 14 and then connect it to the starter kit. this program uses rsk_lib. for details about rsk_lib, see the rs k_lib reference manual. (rsk_lib is the library software provid ed for use with the renesas starter kit for m16c/26a.) the extension board used here is a product from pi s y stem co., ltd. (straight type) received data
? rej05b0816-0110 rev.1.10 2007.11 page 2 of 17 m16c/26a group sample program (message) 3. port arrangement the terminal reception serial port is the f acility mounted on an extension board for th e renesas starter kit. to use this facil ity, con 10mhz lcd p71 xin p60 p61 p62 p63 p90 p91 lcd e lcd rs lcd d7 lcd d6 lcd d5 lcd d4 m30260f8agp terminal data reception ? p83
? rej05b0816-0110 rev.1.10 2007.11 page 3 of 17 m16c/26a group sample program (message) 4. operational outline when a character is input to hyperterminal (keyboard of a pc), the input character is shown on liquid crystal display and at th e same time stored in the internal flash memory. connect the serial port (rs-232c) of a pc and the d-sub connecter on the microcomputer side with a straight cable. when charact ers are input to hyperterminal, the input characters are shown on liquid crystal display on the microcomputer side. if while in this st ate sw1 is depressed, the characters shown on liquid cr ystal display are written into the internal flash memory of the microcomputer. the result of a write operation is shown on liqui d crystal display, indicating whether the characters have been successfully written in. then, when the reset switch is depressed, the data written into memory immediately before that is redisplayed on liquid crystal display. up to 16 characters can be displaye d, not including bs and tab codes. the operation described above is accomplished us ing the following microcomputer facilities: ? timer a0 (timer mode, main 2 ms cycle) this timer counts 2 milliseconds using the main cl ock of the microcomputer as the count source. it is used as the basic timer of rsk_lib. time management and lcd display manage ment are performed using this timer. ? uart2 (clock-asynchronous serial i/o mode, data reception) it produces a transfer clock from the main clock of the microcom puter. the data transmitted via hy perterminal is received using this clock. personal computer (pc) m16c26a straight cable d-sub connector liquid crystal display (lcd) a b c d e f 48#005 internal flash memory block a 0f800h a b c d e f 0f810h when sw1 is depressed, the data displayed on lcd is saved in the internal flash memory. a , b , c , d , e , f
? rej05b0816-0110 rev.1.10 2007.11 page 4 of 17 m16c/26a group sample program (message) 5. operational specification (1) immediately after the reset switch is depressed, a message if any saved in the data flash area is displayed. if no messages are saved in the data flash area (data = 0xff), nothing is displayed. (2) the data received from the terminal is displayed. communication format baud rate: 9,600 bps (in microcomputer, set at 9,615 bps) stop bit: 1 parity: none number of characters received: 16 (only up to 16 characters are accepted) received character c ode (written in ascii) control code tab (0x09): clear the displayed data clear the entire received string bs (0x08): backspace delete one character (3) press sw1 to write the currently displayed message into the data flash. (4) the result of a write to the data flash is displayed for 1 second. when successfully written: displayed as ?program success? when erase error occurred: displayed as ?erase error? when program error occurred: displayed as ?program error? (5) tab code is received, by which the display is cleared. (6) after the reset switch is depressed, the saved data is displayed. (1) reset switch depressed i abcd e f g h (2) character code received (4) write result displayed s u c e c s s prog r a m (3) sw1 depressed (data written) (6) reset switch depressed (saved data displayed) i abcd e f g h (5) tab code received
? rej05b0816-0110 rev.1.10 2007.11 page 5 of 17 m16c/26a group sample program (message) 6. definition of the rsk functionality and the rsk_lib apis and comm on functions used by message operation 6.1 definition of the rsk functionality rskdefine.h file in this application, the following functionalities (those shown in red) are set. individual definition of e ach selected functionality /********************************************************* the boot information on cpu is defined usually, th is mode is used *********************************************************/ //#define _cpu_m16c26a_normal_mod /* use in low power mode can be performed. */ //#define _cpu_m16c26a_32khz_mod /* use of access of a flash can be performed. */ #define _cpu_m16c26a_dataflasf_use /******************************************************** the hardware function wh ich rsk supports is chosen /********************************************************/ //#define _use_key //#define _use_buzzer //#define _option_use_ad #define _option_use_com_rx //#define _option_use_com_tx //#define _opti on_use_infraedrx //#define _opti on_use_infraedtx #define _option_use_sw //#define _option_use_led //#define _option_use_io #if defined _option_use_sw #define _option_use_pushsw1 //#define _option_use_pushsw2 //#define _option_use_pushsw3 #endif
? rej05b0816-0110 rev.1.10 2007.11 page 6 of 17 m16c/26a group sample program (message) 6.2 apis and common functions used apistatustype rl_settimerreq( unsigned int timervalue, char timermode, int *timerno, int *ercode ); apistatustype rl_starttimer( int timerno, int *ercode ); apistatustype rl_checktimer( int timerno, int *ercode ); apistatustype rl_canceltimer( int timerno, int *ercode ); apistatustype rl_putc_lcd( char ylocation, char outc, int *ercode ); apistatustype rl_putc_lcdloc( char xlocation, char ylocation, char rvtime, char outc, int *ercode ); apistatustype rl_open_com( int bitlenght, int stopbit, int parity, int bps, int *ercode ); apistatustype rl_getc_com( char *comrxchar, int *ercode ); apistatustype rl_getswport( char portno, char *indata, int *ercode ); void rl_errorhook( int funcno, int errorno ); for details about the apis and co mmon functions used by the sample program (message), see the re nesas starter kit library v.1.0 0 reference manual.
? rej05b0816-0110 rev.1.10 2007.11 page 7 of 17 m16c/26a group sample program (message) 7. flowchart message clear display on lcd initialize serial i/o wait for first character received process received character display write received character into flash load into flash show flash data process received character display wait for first character received sw1 detected? no yes
? rej05b0816-0110 rev.1.10 2007.11 page 8 of 17 m16c/26a group sample program (message) 8. tutorial 1 launch the hew by double-clicking its icon. 2 change the session name from ?default session? to ?sessionm16c_e8_system.?
? rej05b0816-0110 rev.1.10 2007.11 page 9 of 17 m16c/26a group sample program (message) 3 select ?m30260f8a? for device. select ?download emulat or firmware? for mode.
? rej05b0816-0110 rev.1.10 2007.11 page 10 of 17 m16c/26a group sample program (message) check the box labeled ?power supply is carried out. (max 300ma)? and then select ?5.0v.?
? rej05b0816-0110 rev.1.10 2007.11 page 11 of 17 m16c/26a group sample program (message) 4 in the program and the work ram text boxes of firmware location address, enter ?f a0? and ?0b8? respectively. leave the box labeled ?debug a progr am using the wdt? unchecked.
? rej05b0816-0110 rev.1.10 2007.11 page 12 of 17 m16c/26a group sample program (message) 5 choose dow nload from the debug tab and download a module. the upper-side choices for download show the location from which a pr oject was downloaded.
? rej05b0816-0110 rev.1.10 2007.11 page 13 of 17 m16c/26a group sample program (message) 6 click ?start after reset? to start program execution. 7 please do "cancellation" when "t he file is opened" window opens.
? rej05b0816-0110 rev.1.10 2007.11 page 14 of 17 m16c/26a group sample program (message) 9. example circuit 10. part list part name part no. q?ty manuf acturer type number value remark d-sub connector j1 1 9pin male rs232c driver u3 1 maxim max3221ecae ceramic capacitor c2 - c6 5 panasonic ecj-1vf1h104z 100n chip resistor r3,r4 2 rohm mcr10ezhf103 10k 1/8w, 5% pcb header JA1,ja2 2 molex 10-88-1261 26pin male, 2-row, vertical type
? rej05b0816-0110 rev.1.10 2007.11 page 15 of 17 m16c/26a group sample program (message) 11. web sitet renesas technology web site http://www.renesas.com/
? rej05b0816-0110 rev.1.10 2007.11 page 16 of 17 m16c/26a group sample program (message) revision history content of revision rev. date of issue page points 1.00 2006.06.30 - first revision issued 1.10 2007.11.29 - rsk_lib apis supported
? rej05b0816-0110 rev.1.10 2007.11 page 17 of 17 m16c/26a group sample program (message)


▲Up To Search▲   

 
Price & Availability of JA1

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X